package com.tinyspot.concrete.ribbon.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author Tinyspot
 * @date 2022-12-24 21:39
 */
@Configuration
public class RestTemplateConfiguration {

    @Bean
    @LoadBalanced // 默认负载均衡算法：轮询
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }
}
